import {useNavigate} from "react-router-dom";
import "./index.scss"

export default function ErrorPage({errorCode}: Readonly<{ errorCode?: number }>) {
    const navigate = useNavigate();
    const restart = () => {
        localStorage.removeItem("UserData");
        sessionStorage.clear();
        navigate("/login/register")
    }
    return (
        <div className="ErrorPage">
            <h1>页面出现错误了呢 {JSON.stringify(errorCode)}</h1>
            <h1>快联系管理员修BUG</h1>
            <h1>＞﹏＜</h1>
            <h1><a onClick={restart}>点我返回</a></h1>
        </div>

    )
}